namespace Cik.Gapi4Net.Entlib.Container
{
    using System;
    using System.Collections.Generic;
    using Microsoft.Practices.ServiceLocation;

    internal static class IoC
    {
        public static IEnumerable<TService> GetAllInstances<TService>()
        {
            return ServiceLocator.Current.GetAllInstances<TService>();
        }

        public static IEnumerable<object> GetAllInstances(Type serviceType)
        {
            return ServiceLocator.Current.GetAllInstances(serviceType);
        }

        public static TService GetInstance<TService>()
        {
            return ServiceLocator.Current.GetInstance<TService>();
        }

        public static TService GetInstance<TService>(string key)
        {
            return ServiceLocator.Current.GetInstance<TService>(key);
        }

        public static object GetInstance(Type serviceType)
        {
            return ServiceLocator.Current.GetInstance(serviceType);
        }

        public static object GetInstance(Type serviceType, string key)
        {
            return ServiceLocator.Current.GetInstance(serviceType, key);
        }
    }
}